package com.bd03.streaminglearn.mytest

import java.io.FileInputStream

object ReaderDemo {
  def main(args: Array[String]): Unit = {
    val stream = new FileInputStream("D:\\data\\ip\\ip.txt")
    val bytes = new Array[Byte](1024)
    var length = 0;

    while(!((length= stream.read(bytes))==1 || length== -1)){
      println(new String(bytes,0,length))
    }

  }

}
